package loengud.w08;

import javax.swing.*;

//creates a small window with a text in it
public class HelloGraphics {

	public static void main(String[] args) {

		// create a new window
		JFrame frame = new JFrame("HelloGraphics");
		
		// create a label widget with text, put on window 
		JLabel label = new JLabel("Hello graphical world!"); 
		frame.getContentPane().add(label); 
		//frame.add(label);
		
		// react to window close, pack stuff, show out
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.pack(); // auto-size to window 
		// make window visible
		frame.setVisible(true);
	} // -main
}